package com.jzo2o.health.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jzo2o.health.model.domain.ReservationSetting;
import com.jzo2o.health.model.dto.request.ReservationSettingUpsertReqDTO;
import com.jzo2o.health.model.dto.response.ReservationDateResDTO;
import com.jzo2o.health.model.dto.response.ReservationSettingResDTO;
import org.springframework.web.multipart.MultipartFile;

import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 * 预约设置 服务类
 * </p>
 *
 * @author WangXinyi
 * @since 2024-12-13
 */
public interface IReservationSettingService extends IService<ReservationSetting> {

    /**
     * 按月查询预约设置
     * @param date
     * @return
     */
    List<ReservationSettingResDTO> getReservationSettingByMonth(String date);

    /**
     * 编辑预约设置
     * @param reservationSettingUpsertReqDTO
     */
    void editNumberByDate(ReservationSettingUpsertReqDTO reservationSettingUpsertReqDTO);


    /**
     * 管理端批量预约设置
     * @param file
     */
    void upload(MultipartFile file);

    /**
     * 用户端预约设置查询
     * @param month
     * @return
     */
    ReservationDateResDTO getReservationDateByMonth(String month);


    /**
     * 预约人数+1
     * @param reservationDate
     */
    void updateReservations(LocalDate reservationDate);

    /**
     * 取消订单，预约人数-1
     * @param reservationDate
     */
    void substract(LocalDate reservationDate);
}
